package JavaDesign.report_finish;

/**
 * @author zouran
 * createDate：2023/12/22  11:13
 */
public class Parent implements Visitor {

    @Override
    public void visit(Student student) {
        System.out.printf("学生信息 姓名：{%s} 班级：{%s} 排名：{%d}", student.name, student.clazz, student.ranking());
    }

    @Override
    public void visit(Teacher teacher) {
        System.out.printf("老师信息 姓名：{%s} 班级：{%s}", teacher.name, teacher.clazz);
    }
}
